package org.bitoy.shimmer.common.util;

import java.io.*;
import java.util.Scanner;

public class IOUtil {
    public static void main(String[] args) throws IOException {
        File inFile = new File("");
        File outFile = new File("");
        FileInputStream fis = new FileInputStream(inFile);
        FileOutputStream fos = new FileOutputStream(outFile);
        // InputStreamReader实现Reader接口
        InputStreamReader isr = new InputStreamReader(fis);
        // 转换流也能接收缓冲字节流
        //BufferedInputStream bis = new BufferedInputStream(fis);
        //InputStreamReader isr = new InputStreamReader(bis);
        OutputStreamWriter osw = new OutputStreamWriter(fos);

        // FileReader继承InputStreamReader，封装了转换流，方便使用
        FileReader fr = new FileReader(inFile);
        // 字符缓冲流
        BufferedReader br = new BufferedReader(fr);
        String temp = null;
        while ((temp = br.readLine()) != null) {
            System.out.println(temp);
        }
    }
}
